package com.gdwhomework.chapter07.homework004;

public class Teacher extends Person{
    private int classDay;//上课的天数
    private double classSal;//每节课的额外课酬

    public Teacher(String name, int age, char gender, double sal, int classDay, double classSal) {
        super(name, age, gender, sal);
        this.classDay = classDay;
        this.classSal = classSal;
    }

    public int getClassDay() {
        return classDay;
    }

    public void setClassDay(int classDay) {
        this.classDay = classDay;
    }

    public double getClassSal() {
        return classSal;
    }

    public void setClassSal(double classSal) {
        this.classSal = classSal;
    }

    @Override
    public void showAllYearSal() {
        System.out.print("教师"+getName()+"的全年工资：");
        System.out.println(getSal()*12+getClassDay()*getClassSal());
    }
}
